import fetch from 'common/src/utils/fetch';

// 查询培养模板规则列表
export function queryCultureTemplateList(data) {
    return fetch({
        url: '/api/cultureservice/cultureTemplate/queryCultureTemplateList',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 查询培养规则列表
export function findCultureRuleList(data) {
    return fetch({
        url: '/api/cultureservice/cultureRule/findCultureRuleList',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 查询课程性质列表
export function queryCoursesLabelListBytemplateId(data) {
    return fetch({
        url:
            '/api/cultureservice/coursesLabel/queryCoursesLabelListBytemplateId',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 查询第一外语列表
export function findComplationsContrastList(data) {
    return fetch({
        url:
            '/api/cultureservice/complationsContrast/findComplationsContrastList',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 查询大课列表
export function queryElectiveCourseList(data) {
    return fetch({
        url:
            '/api/cultureservice/firstLanguageContrast/queryFirstLangCourseList',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 查询小课列表
export function queryOptionalCourseList(data) {
    return fetch({
        url: '/api/cultureservice/courses/queryOptionalCourseList',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

/**
 *删除培养规则
 * @param {data} data
 */
export function deleteCultureRule(data) {
    return fetch({
        url: '/api/cultureservice/cultureRule/deleteCultureRule',
        method: 'delete',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

/**
 * 删除大课小课对照表
 * @param {data} data
 */
export function deleteComplationsContrast(data) {
    return fetch({
        url:
            '/api/cultureservice/complationsContrast/deleteComplationsContrast',
        method: 'delete',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

// 新增培养规则
export function addCultureRule(data) {
    return fetch({
        url: '/api/cultureservice/cultureRule/addCultureRule',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 修改培养规则
export function updateCultureRule(data) {
    return fetch({
        url: '/api/cultureservice/cultureRule/updateCultureRule',
        method: 'put',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 新增大课小课对照表
export function addComplationsContrast(data) {
    return fetch({
        url: '/api/cultureservice/complationsContrast/addComplationsContrast',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

// 修改大课小课对照表
export function updateComplationsContrast(data) {
    return fetch({
        url:
            '/api/cultureservice/complationsContrast/updateComplationsContrast',
        method: 'put',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}
